<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  let array = ['hdcms', 'houdunren']
  //  添加,从数组的尾部开始顺序添加
  array.push('java', 'js', 'php')

  //  合并两个数组
  let temp = ['scala', 'dart']
  // 巧用push 和 ... 操作符
  array.push(...temp)
  console.log(array)

  //  demo 创建数组

  function rangeArray(start, end) {
    let array = [];
    for (let i = start; i <= end; i++) {
      array.push(i)
    }
    return array;
  }

  console.table(rangeArray(1, 6))
</script>
</body>
</html>